//用户相关（登录、注册、权限）
import request from './request'

// 登录
export const login = (data) => {
  return request.post('/user/login/', data)
}

// 获取用户信息
export const getUserInfo = () => {
  return request.get('/user/info/')
}

// 修改密码
export const changePassword = (data) => {
  return request.post('/user/change-password/', data)
}

// 获取用户权限
export const getPermissions = () => {
  return request.get('/user/permissions/')
}

// 登出
export const logout = () => {
  return request.post('/user/logout/')
}